/*
 *@Description: 日志打印方法（后期可扩展记录日志到mongodb数据库，做数据分析）
 *@Author:  lupan
 *@Date: 2019-08-04 17:04:50
*/

const log = require('consola')
const moment = require('moment')
module.exports = {
  success: (msg) => {
    log.success(`[${moment().format('YYYY-MM-DD HH:mm:ss')}]：${msg}`)
  },
  error: (msg) => {
    log.error(`[${moment().format('YYYY-MM-DD HH:mm:ss')}]：${msg}`)
  },
  warn: (msg) => {
    log.warn(`[${moment().format('YYYY-MM-DD HH:mm:ss')}]：${msg}`)
  }
}